package com.szty.libarytest.other

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.MotionEvent
import com.szty.libarytest.R

class ClickActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_click)
//        ll_click_test.setOnClickListener {
//
//        }
        val a = 11f
        val b = 12f
        if(a<b){
            "小于".loge()
        }
    }

    override fun onTouchEvent(event: MotionEvent?): Boolean {
        if(event == null) return false
        when(event.action){
            MotionEvent.ACTION_DOWN->{
                "按下".loge()
                event.x.loge()
                event.y.loge()
            }
            MotionEvent.ACTION_UP->{
                "抬起".loge()
                event.x.loge()
                event.y.loge()
            }
        }
        return super.onTouchEvent(event)
    }
}